home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / graphics / gfxmacros.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  2KB  |  61 lines

  1. #ifndef GRAPHICS_GFXMACROS_H
  2. #define GRAPHICS_GFXMACROS_H 1
  3. /*
  4. ** gfxmacros.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20. #ifndef  GRAPHICS_RASTPORT_H
  21. #include <graphics/rastport.h>
  22. #endif
  23.  
  24. /*
  25. #define ON_DISPLAY  custom.dmacon = BITSET|DMAF_RASTER 
  26. #define OFF_DISPLAY custom.dmacon = BITCLR|DMAF_RASTER 
  27. #define ON_SPRITE   custom.dmacon = BITSET|DMAF_SPRITE 
  28. #define OFF_SPRITE  custom.dmacon = BITCLR|DMAF_SPRITE 
  29.  
  30. #define ON_VBLANK   custom.intena = BITSET|INTF_VERTB 
  31. #define OFF_VBLANK  custom.intena = BITCLR|INTF_VERTB 
  32.  
  33. #define SetDrPt(w, p)     (w)->LinePtrn = p (w)->Flags |= FRST_DOT (w)->linpatcnt=15 END STRUCT
  34. #define SetAfPt(w, p, n)   (w)->AreaPtrn = p (w)->AreaPtSz = n END STRUCT
  35.  
  36. #define SetOPen(w, c)     (w)->AOlPen = c (w)->Flags |= AREAOUTLINE END STRUCT
  37. #define SetWrMsk(w, m)    (w)->Mask = m END STRUCT
  38. */
  39. /* the SafeSetxxx macros are backwards (pre V39 graphics) compatible versions */
  40. /* using these macros will make your code do the right thing under V39 AND V37 */
  41. /*
  42. #define SafeSetOutlinePen(w, c)     if (GfxBase->LibNode.lib_Version<39)   (w)->AOlPen = c (w)->Flags |= AREAOUTLINE END STRUCT else SetOutlinePen(w, c)  END STRUCT
  43. #define SafeSetWriteMask(w, m)    if (GfxBase->LibNode.lib_Version<39)   (w)->Mask = (m) END STRUCT else SetWriteMask(w, m)  END STRUCT
  44. */
  45. /* synonym for GetOPen for consistency with SetOutlinePen */
  46. /*
  47. #define GetOutlinePen(rp) GetOPen(rp)
  48.  
  49. #define BNDRYOFF(w)  (w)->Flags &= ~AREAOUTLINE END STRUCT
  50.  
  51. #define CINIT(c, n)   { UCopperListInit(c, n)
  52. #define CMOVE(c, a, b)     { CMove(c, &a, b) CBump(c)}
  53. #define CWAIT(c, a, b)     { CWait(c, a, b) CBump(c) }
  54. #define CEND(c)  { CWAIT(c, 10000, 255) }
  55.  
  56. #define DrawCircle(rp, cx, cy, r)  DrawEllipse(rp, cx, cy, r, r) 
  57. #define AreaCircle(rp, cx, cy, r)  AreaEllipse(rp, cx, cy, r, r) 
  58. */
  59.  
  60. #endif  /* GRAPHICS_GFXMACROS_H */
  61.